#pragma once

#include"RBTree_with_iterator.h"

namespace RoundBottle
{
	template<class K>
	struct KeyofSet
	{
		const K& operator()(const K& data)
		{
			return data;
		}
	};

	template<class K>
	class set
	{
	public:
		typedef typename RBTree<K, KeyofSet<K>>::const_iterator iterator;
		typedef typename RBTree<K, KeyofSet<K>>::const_iterator const_iterator;
	
		iterator begin()const { return _rb.Begin(); }
		iterator end()const { return _rb.End(); }

		pair<iterator, bool> insert(const K& data)
		{
			return _rb.Insert(data);
		}

	private:
		RBTree<K, KeyofSet<K>> _rb;
	};

}

